<template>
  <div class="app-container">
    <el-container>
      <el-header>
        <div class="header-content">
          <h1>虎翼走访</h1>
        </div>
      </el-header>
      <el-container>
        <el-aside width="200px">
          <el-menu
            :default-active="$route.path"
            class="el-menu-vertical-demo"
            router
          >
            <el-menu-item index="/">
              <el-icon><dataBoard /></el-icon>
              <span>走访工作台</span>
            </el-menu-item>
            <el-menu-item index="/create-plan">
              <el-icon><documentAdd /></el-icon>
              <span>创建走访计划</span>
            </el-menu-item>
            <el-menu-item index="/process">
              <el-icon><dataAnalysis /></el-icon>
              <span>走访过程跟踪</span>
            </el-menu-item>
            <el-menu-item index="/assistant">
              <el-icon><Message /></el-icon>
              <span>走访助手</span>
            </el-menu-item>
            <el-menu-item index="/report">
              <el-icon><Document /></el-icon>
              <span>走访报告</span>
            </el-menu-item>
            <el-menu-item index="/feedback">
              <el-icon><edit /></el-icon>
              <span>走访结果反馈</span>
            </el-menu-item>
            <el-menu-item index="/batch-create">
              <el-icon><MoreFilled /></el-icon>
              <span>批量创建走访计划</span>
            </el-menu-item>
          </el-menu>
        </el-aside>
        <el-main>
          <router-view />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import {
  DocumentAdd,
  DataBoard,
  DataAnalysis,
  Message,
  Document,
  Edit,
  MoreFilled,
} from "@element-plus/icons-vue";
</script>

<style lang="scss">
.app-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.el-header {
  background-color: $primary-color;
  color: white;
  padding: 0 20px;
  display: flex;
  align-items: center;

  .header-content h1 {
    margin: 0;
    font-size: 24px;
  }
}

.el-aside {
  background-color: $sidebar-bg;
  overflow: hidden;
}

.el-menu-vertical-demo {
  height: 100%;
  border-right: none;
}

.el-menu {
  background-color: $sidebar-bg;
  color: white;

  .el-menu-item {
    color: white;

    &:hover,
    &.is-active {
      background-color: $primary-color;
    }
  }
}

.el-main {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}
</style>
